[Unit]
Description=Kubernetes Kubelet
Documentation=https://github.com/kubernetes/kubernetes
After=docker.service cri-docker.service containerd.service
Requires=docker.service containerd.service

[Service]
WorkingDirectory=/var/lib/kubelet
ExecStart={{ K8S_ALL_EXE_FILE_PATH }}/kubelet \
  --bootstrap-kubeconfig={{ KUBERNETES_CONFIG_PATH }}/kubelet-bootstrap.kubeconfig \
  --cert-dir={{ PKI_PATH }} \
  --kubeconfig={{ KUBERNETES_CONFIG_PATH }}/kubelet.kubeconfig \
  --config={{ KUBERNETES_CONFIG_PATH }}/kubelet.json \
  --container-runtime-endpoint=unix:///run/cri-dockerd.sock \
  --network-plugin=cni \
  --pod-infra-container-image={{ K8S_PAUSE_IMAGE }} \
  --alsologtostderr=true \
  --logtostderr=false \
  --v=2
Restart=on-failure
RestartSec=5
 
[Install]
WantedBy=multi-user.target

